package com.lhoverc.controller.visitor;

import com.lhoverc.annotation.Log;
import com.lhoverc.pojo.Result;
import com.lhoverc.pojo.VO.ApplyDataVO;
import com.lhoverc.pojo.VO.TodayApplyVO;
import com.lhoverc.pojo.dto.InvitationDto;
import com.lhoverc.pojo.entity.ApplyEntity;
import com.lhoverc.service.apply.ApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;
import java.util.List;

/**
 * @Author: LiCheng
 * @CreateTime: 2025-04-16
 * @Description:
 * @Version: 1.0
 */
@Slf4j
@RestController
@RequestMapping("/visitor/apply")
public class VisitorApplyController {
    @Autowired
    private ApplyService applyService;

    @PostMapping("/check")
    public Result check(@RequestBody InvitationDto invitationDto) {
        log.info("接收数据：{}", invitationDto);
        Result result = applyService.check(invitationDto);
        return result;
    }

    @Log
    @PostMapping("/pass")
    public Result pass(@RequestBody ApplyEntity applyEntity) {
        log.info("接收数据：{}", applyEntity);
        applyService.pass(applyEntity);
        return Result.success();
    }

}
